/*!
 *  \file       StaircaseSignalGenerator.hpp
 *  \brief      Definizione della classe \c StaircaseSignalGenerator
 *  \author     Davide Scola <S2299453@studenti.unige.it>
 *  \author	Minetti Alberto <S3064777@studenti.unige.it>
 *  \version    1.0
 *
 */

#ifndef _STAIRCASE_SIGNAL_GENERATOR_H
#define _STAIRCASE_SIGNAL_GENERATOR_H

/*!
 *  \brief      Definizione della classe \c StaircaseSignalGenerator
 */
template< class tType >
class StaircaseSignalGenerator : public ISignalGenerator< tType >
{
  public :
    StaircaseSignalGenerator( int, char *[] );
    StaircaseSignalGenerator( StaircaseSignalGenerator< tType > const& );
    
    virtual StaircaseSignalGenerator& operator=( const StaircaseSignalGenerator& );
    
    // interface methods
    virtual tType operator() ( void );
    
  protected :
    bool isInRange( tType, std::pair< tType, tType > & );
    bool parseInterval( const char *, std::pair< tType, tType > & );
    
  private :
    unsigned long int currPoint_;
    std::vector< std::pair< tType, tType > > intervals_;
};

#endif              /* _STAIRCASE_SIGNAL_GENERATOR_H */
